#include<bits/stdc++.h>
#define ll long long
#define pr printf
#define sc scanf
using namespace std;
ll a[100005];
int main()
{
	ll n,p,i,j=1,cnt=0,temp,max=0;
	sc("%lld%lld",&n,&p);
	for(i=0;i<n;i++)
		sc("%lld",&a[i]);
	sort(a,a+n);
	for(i=0;i<n;i++){
		//cnt=0;
		temp=a[i]*p;
		for(j=i+cnt;j<n;j++){
			if(a[j]>temp)
				break;
			cnt=cnt>j-i+1?cnt:j-i+1;
		}
		//max=max>cnt?max:cnt;
	}
	pr("%lld\n",cnt);
	return 0;
}
